$$\text{Forecasting Greenhouse Gases in Algeria}$$

$\text{Introduction:}$

The station is located on the summit (plateau) of the second highest point of the Hoggar mountain range in the Saharan desert. The site is very remote at a distance of 50 km from Tamanrasset. Touristic activities in the area are limited due to difficult access to a few dozen visitors per day. Vegetation is extremely sparse.

$\text{Location details:}$

  • Country: Algeria
  • Latitude: 23.2625° North
  • Longitude: 5.6322° East
  • Elevation: 2710.00 masl
  • Time Zone: Local Standard Time + -1.0 hour(s) = UTC
In [1]:
from fbprophet import *
import pandas as pd
import plotly.offline as py
import plotly.graph_objs as go
In [2]:
def forecasting(gas_name, gas_code, months, unit):
    gas_data = pd.read_table('C:/Users/Taha/Desktop/algeria_ghg/'\
               +gas_code+'_ask_surface-flask_1_ccgg_month.txt',
               sep='\s{1,}', names=['stations','year','month','y'], engine='python')
    gas_data['ds'] = pd.to_datetime(gas_data[['year', 'month']].assign(DAY=1))
    
    model = Prophet(weekly_seasonality=False, daily_seasonality=False)
    model.set_auto_seasonalities
    model.add_seasonality(name='monthly', period=30, fourier_order=5)
    model.fit(gas_data)
    future = model.make_future_dataframe(periods=months,freq='M')
    forecast = model.predict(future)
    py.init_notebook_mode()
    fig1 = plot.plot_plotly(model, forecast)
    fig1.update_layout(title=str(gas_name)+' Forecast', xaxis_title='Time', 
                      yaxis_title='Parts per '+unit+'illion (PP'+unit+')')
    py.iplot(fig1)
    
    fig2 = plot.plot_components_plotly(model, forecast)
    fig2.update_layout(title=str(gas_name)+'<br>Trend & Seasonality', height=500)
    py.iplot(fig2)

$\text{Carbon Dioxide}$

In [3]:
'''
Measurements are reported in units of 
micromol/mol (10^-6 mol CO2 per mol of dry air or parts per 
million (ppm)). Measurements are directly traceable to the 
WMO X2007 CO2 mole fraction scale.
'''
forecasting('Carbon Dioxide', 'co2', 240, 'M')

$\text{Methane}$

In [4]:
'''
Measurements are reported in units of nanomol/mol 
(10^-9 mol CH4 per mol of dry air (nmol/mol) or parts per billion 
(ppb)) relative to the NOAA 2004A CH4 standard scale.
'''
forecasting('Methane', 'ch4', 240, 'B')

$\text{Carbon Monoxide}$

In [5]:
'''
Carbon monoxide mixing ratios in these files are reported 
in units of nmol/mol (10^-9 mole CO per mole of dry air 
or as part per billion by mole fraction (ppb)) relative
to the NOAA/WMO CO scale (Novelli et al., 1991, Novelli 
et al., 2003).
'''
forecasting('Carbon Monoxide', 'co', 240, 'B')

$\text{Nitrous Oxide}$

In [7]:
'''
N2O measurements are reported in units of nanomol/mol (10^-9 mol N2O 
per mol of dry air (nmol/mol) or parts per billion (ppb)) relative 
to the NOAA 2006A N2O standard scale.
'''
forecasting('Nitrous Oxide', 'n2o', 240, 'B')

$\text{Sulfur Hexafluoride}$

In [8]:
'''
SF6 measurements are reported in units of picomol/mol (10^-12 mol 
SF6 per mol of dry air (pmol/mol) or parts per trillion (ppt)) 
relative to the NOAA 2014 SF6 standard scale.
'''
forecasting('Nitrous Oxide', 'sf6', 240, 'T')

$\text{Data Source}$

  • National Oceanic and Atmospheric Administration (NOAA)
  • Earth System Research Laboratory (ESRL)
  • Global Monitoring Division (GMD)
  • Carbon Cycle Greenhouse Gases (CCGG)

$\text{Data Source}$